<?php
/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: GetSortClass.php 130 2011-03-18 03:10:02Z cheng.wei $$
 * @copyright Copyright (c) 2008 Evebit Inc. China (http://www.evebit.com)
 */

/**
 * Get Revage rate and get rate count
 * 
 * @package   App_Sample
 * @author    Zuo Fujie <zuo.fujie@evebit.com>
 * @version   $$Id: GetSortClass.php 130 2011-03-18 03:10:02Z cheng.wei $$
 */
class Evebit_View_Helper_GetTrailComment extends Zend_View_Helper_Abstract {
	
	public function getTrailComment($module, $controller) {
		$data ['paginator']      = $this->view->paginator;
		$data ['displaycomment'] = $this->view->displaycomment;
		$data ['displayrate']    = $this->view->displayrate;
		$data ['baseUrl']        = $this->view->baseUrl ();
		$data ['trailContent']    = $this->view->trailContent;
		
		$scriptPath = str_replace('planner', 'blocks', $this->view->getScriptPaths());
		$this->view->setScriptPath($scriptPath);
		
		$data ['action']         = $this->view->action ( 'render', 'block', 'blocks', 
		                                         array ('template' => 'pagination', 
		                                                'paginator' => $this->view->paginator, 
		                                                'style' => 'sliding' ,
		                                                'render' => 'sliding_trail_js') );
		$data ['module']     = $module;
		$data ['controller'] = $controller;

	    return $this->view->action ( 'render', 'block', 'blocks', 
		                                         array ('template' => 'trailcomment', 
		                                                'data' => $data) );
		//return $this->view->partial ( 'trailcomment.phtml', 'blocks', $data );
	}

}